import request from '@/utils/request'

// 查询付款单列表
export function listPaymentVoucher(query) {
  return request({
    url: '/finance/PaymentVoucher/selectPaymentVoucherList',
    method: 'get',
    params: query
  })
}
//核准付款单
export function approvedPaymentVoucher(paymentVoucherIds) {
  return request({
    url: '/finance/PaymentVoucher/approvedPaymentVoucher/' +paymentVoucherIds,
    method: 'post'
  })
}
//日志记录
export function selectPaymentVoucherLogList(query) {
  return request({
    url: '/finance/PaymentVoucher/selectPaymentVoucherLogList',
    method: 'get',
    params: query
  })
}
//驳回
export function rejectPaymentVoucher(paymentVoucherIds,rejectRemark) {
  return request({
    url: '/finance/PaymentVoucher/rejectPaymentVoucher',
    method: 'post',
    params: {
      paymentVoucherIds,
      rejectRemark
    }
  })
  }
// 上传水单
export function uploadWaterBillImg(data) {
  return request({
    url: '/finance/PaymentVoucher/uploadWaterBillImg',
    method: 'post',
    data: data
  })
}
// 查询付款单详细
export function getPaymentSlips(paymentId) {
  return request({
    url: '/finance/PaymentSlips/' + paymentId,
    method: 'get'
  })
}
//撤回
export function revokeProcuredPlan(data,componentPath) {
  return request({
    url: '/finance/PaymentVoucher/revokeProcuredPlan',
    method: 'post',
    params: {
      componentPath,
    },
    data: data
  })
}
//标记锁定
export function tagLockPaymentVoucher(paymentVoucherIds) {
  return request({
    url: '/finance/PaymentVoucher/tagLockPaymentVoucher/' +paymentVoucherIds,
    method: 'post'
  })
}
//批量核准（单独付款）
export function approvedPaymentVoucherOnly(paymentVoucherIds) {
  return request({
    url: '/finance/PaymentVoucher/approvedPaymentVoucherOnly/' +paymentVoucherIds,
    method: 'post'
  })
}
